package com.adtech.adms.device.action;

import java.util.List;

import com.adtech.adms.commons.web.action.DataGridAction;
import com.adtech.adms.device.pojo.GuiDeviceaction;
import com.adtech.adms.device.service.ActionService;
import com.adtech.core.dao.query.FilterMap;
import com.adtech.core.dao.query.Pager;
import com.adtech.core.dao.query.Sort;
import com.adtech.core.exception.ServiceException;
import com.adtech.core.exception.SystemException;

public class PolicyResultAction extends DataGridAction{

	private ActionService actionService;
	
	private GuiDeviceaction action;
	

	public ActionService getActionService() {
		return actionService;
	}

	public void setActionService(ActionService actionService) {
		this.actionService = actionService;
	}

	public GuiDeviceaction getAction() {
		return action;
	}

	public void setAction(GuiDeviceaction action) {
		this.action = action;
	}

	public String main(){
		return SUCCESS;
	}
	public String getDetail() {
//		if (id != null) {
//			policy = policyService.getPolicy(new Integer(id));
//			if(policy != null){
//				List<Topo> topos = policy.getTopos();
//				topoNames = generateTopoNames(topos);
//			}
//
//		}
		return SUCCESS;
	}
	
	@Override
	protected List<?> getModelDataGridList(Pager pager, FilterMap filtermap,
			Sort sort) throws SystemException, ServiceException {
		return actionService.getActionList(pager, filtermap.toExpression(), sort);
	}

}
